orfail
An error handling library for portable unrecoverable errors.
This crate provides,
Failure
struct that represents an unrecoverable error with an error message and user-level backtrace- Constituted with simple types (
u32
,String
, andVec
of those)- Portable across process and language boundaries
- Optional
serde
support ("serde" feature)
- Doesn't implement
std::error::Error
trait
- Constituted with simple types (
OrFail
trait- Backtrace location is appended to
Failure
each time when callingOrFail::or_fail()
bool
,Option<_>
andResult<_, _>
implementOrFail
- Backtrace location is appended to
Examples
use ;
// OK
assert_eq!;
// NG
assert_eq!;